package com.itheima.health.dao;

import com.itheima.health.pojo.entity.OrderSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface OrderSettingDao {

    void insertOrderSetting(OrderSetting orderSetting);

    List<OrderSetting> getOrderSettingByMonth(LocalDate begin, LocalDate end);

    //查询设置的当日预约人数
    @Select("select number from t_ordersetting where orderDate = #{localDate}")
    Integer selectNumberByDate(LocalDate localDate);

    void editNumberByDate(LocalDate orderDate, int number);

    void deleteByDate(LocalDate orderDate);

    /**
     * 查询明天到月末的每日已预约人数
     * @param tempDate
     * @return
     */
    Integer selectOrderedBYTempDate(LocalDate tempDate);
}
